// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html

import LoadTable, { TableType } from "./LoadTable";
import GouMaiData from "./tableDesc/GouMaiData";
import JiaGeData from "./tableDesc/JiaGeData";


const {ccclass, property} = cc._decorator;

@ccclass
export default class Test extends cc.Component {

    @property(cc.Label)
    label: cc.Label = null;

    @property
    text: string = 'hello';

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {}

    start () {
        let gouMai: GouMaiData = null;
        let gouMais: GouMaiData[] = null;
        this.scheduleOnce(() => {
            gouMai = LoadTable.Instance.searchTable(TableType.Table_Type_GouMai, 'NT1');
            gouMais = LoadTable.Instance.searchTables(TableType.Table_Type_GouMai);
            console.error('gouMai: ', gouMai);
            console.error('gouMais: ', gouMais);
            
        },5)
    }

    // update (dt) {}
}
